<% content_for :css do %>
  <%= stylesheet_link_tag 'tools_web_fetions_show' %>
<% end %>
<div id="web_fetion">
  <div class='head'>
    <div class='title'>
      <%= @tool.name %>
    </div>
    <div class='synopsis'>
      -<%= sanitize_all @tool.synopsis %>
    </div>
  </div>
  <div class='body'>
    <div id='new_web_fetion_sm' class='content'>
      <% form_tag '', :id => "#{@tool.id}_web_fetion_form" do %>
      <div class='web_fetion'>
        <dl id='web_fetion_fetion_mobile' style='<%= current_user.try(:fetion?) ? 'display:none' : '' %>'>
          <dt>俺的手机号：</dt>
          <dd>
            <%= text_field_tag :'fetion_sm[mobile]',current_user.try(:mobile) , :id => "fetion_sm_#{@tool.id}_mobile" %>
          </dd>
        </dl>
        <div>
        <dl id='web_fetion_fetion_password' style='<%= current_user.try(:fetion?) ? 'display:none' : '' %>'>
          <dt>飞信密码：</dt>
          <dd>
            <%= password_field_tag :'fetion_sm[password]','' ,:id => "fetion_sm_#{@tool.id}_password"%>
          </dd>
        </dl>
        <dl id='fetion_verify' style='display:none;'>
          <dt>校验码：</dt>
          <dd id='fetion_verify_inputs'>
            <%= hidden_field_tag :'verify_code'%>
            <%= hidden_field_tag :'verify_image_id'%>
          </dd>
        </dl>
        </div>
        <dl>
          <dt>好友列表：</dt>
          <dd>
            <%= select_tag :'fetion_sm[destMobile]',current_user.try(:mobile) %>  
            <%= link_to_update_fetion_friends_in_show @tool, :update => :fetion_sm_destMobile %>
          </dd>
        </dl>
        <dl>
          <dt>短信内容：</dt>
          <dd>
            <%= text_area_tag :'fetion_sm[content]','', :onfocus => "this.select()" %>
          </dd>
        </dl>        
      </div>  
      <% end %>
      <dl>
        <dd class="center">
          <%= link_to_send_web_fetion_sm_in_show @tool %> 
        </dd>
      </dl>
    </div>
  </div>
  <div class='bottom'>
    <div class='introduce'>
      <%= @tool.introduce %>
    </div>
  </div>
</div>
<div class="span-19 last mb" id="other_support_sm_tools">
  <div class="span-19 last title mb">› <b><%= has_logined_by_user? ? '您还能享用以下支持免费短信的吐司' : '成为会员后还能享用到' %>：</b>: </div>
  <ul class="itemlist1">
    <% @tool.others_support_sms.each do |tool| %>
    <li>
      <div class='logo'>
        <% link_to tool_url(tool), :class => :b,:target => :_blank do %>
          <%= tool_logo_image_tag tool, :size => '120x140', :class => :hand %>
        <% end %> 
      </div>
      <div class="list_name">
        <%= link_to_tool tool, :target => :_blank %>
      </div>
    </li> 
    <% end %>                        
  </ul>
</div>